package com.example.Staff.service.impl;
import com.example.Staff.domain.Staff;
import com.example.Staff.mapper.StaffMapper;
import com.example.Staff.service.IStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class StaffServiceImpl implements IStaffService{
    @Autowired
    private StaffMapper staffMapper;

    /**
     * 查询员工
     * @param staff
     * @return
     */
    @Override
    public List<Staff> selectStaff(Staff staff) {
        return staffMapper.selectStaff(staff);
    }

    /**
     * 新增员工
     * @param staff
     */
    @Override
    public void insertStaff(Staff staff) {
        staffMapper.insertStaff(staff);
    }

    /**
     * 修改员工
     * @param staff
     */
    @Override
    public void updateStaffByStaff_id(Staff staff) {
        staffMapper.updateStaffByStaff_id(staff);
    }

    /**
     * 删除员工
     * @param staff_id
     */
    @Override
    public void delStaffByStaff_id(String staff_id) {

        staffMapper.delStaffByStaff_id(staff_id);
    }

  @Override
    public Staff selectOneStaff(Staff staff) {
        return staffMapper.selectOneStaff(staff);
    }

}
